﻿<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php require_once('header.html')?>

<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">
        DouPHP 管理中心
        <b>></b>
        <strong>产品管理</strong>
    </div>
    <div id="manager" class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3>
            <a href="<?php echo site_url('admin/product/addproduct')?>" class="actionBtn">添加产品</a>产品管理
        </h3>
        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <tr>
                <th width="30" align="center">编号</th>
                <th align="left">产品名称</th>
                <th align="left">产品图片</th>
                <th align="left">热销设置</th>
                <th align="center">操作</th>
            </tr>
            <?php foreach($productList as $productItem):?>
            <tr>

                <td align="center"><?php echo $productItem->pid;?></td>
                <td><?php echo $productItem->ptitle;?></td>
                <td><img src="<?php echo $productItem->pimgurl;?>" style="height:40px;width:35px;" /></td>
                <td><span><?php echo $productItem->pishot==1?'<a href="'.site_url('admin/product/usethot/'.$productItem->pid).'">取消</a>':'<a href="'.site_url('admin/product/sethot/'.$productItem->pid).'">热销</a>'?></span></td>
                <td align="center">
                    <a href="<?php echo site_url('admin/product/editproduct/'.$productItem->pid)?>">编辑</a>|
                    <a href="<?php echo site_url('admin/product/delproduct/'.$productItem->pid)?>">删除</a>
                </td>
            </tr>
            <?php endforeach; ?>
        </table>
        <div class='page'>
            <?php echo $links?>
        </div>
    </div>
</div>